package com.shamyang.java8.c01;

/**
 * 根据颜色筛选
 */
public class PredicateByColor implements MyPredicate<Apple>{

    private String color;

    public PredicateByColor(String color) {
        this.color = color;
    }

    @Override
    public boolean test(Apple e) {
        return e.getColor().equals(color);
    }
}
